package com.hw.higress.consumer.controller;

import com.hw.higress.common.remote.ProducerClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.net.UnknownHostException;

/**
 * @program: cloud-higress
 * @description:
 * @author: hewei
 * @date: 2023-07-15 13:26
 **/

@RestController
@RequestMapping("/consumer")
public class ConsumerController {

    @Resource
    ProducerClient producerClient;

    @GetMapping("/producerInfo")
    public String producerInfo() throws UnknownHostException {
        return producerClient.host();
    }
}